	$(function(){
        //按钮单击时执行
        $("#admin_help_add_do").click(function(){
			toastr.options = {
			  "closeButton": true,
			  "debug": false,
			  "progressBar": true,
			  "positionClass": "toast-bottom-full-width",
			  "onclick": null,
			  "showDuration": "400",
			  "hideDuration": "1000",
			  "timeOut": "7000",
			  "extendedTimeOut": "1000",
			  "showEasing": "swing",
			  "hideEasing": "linear",
			  "showMethod": "fadeIn",
			  "hideMethod": "fadeOut"
			}
			//输入验证
            
			if($("#help_title").val() == ""){  
                toastr.warning("帮助标题不能为空！");  
                $("#help_title").focus();  
                return false;  
            }  
			if($("#help_body").val() == ""){  
                toastr.warning("帮助内容不能为空！");  
                $("#help_body").focus();  
                return false;  
            }
			var help_type = $('#help_type option:selected').val();
			var help_title = $('#help_title').val();
			var help_body = $('#help_body').val();
            //Ajax调用处理
            var admin_help_add = $.ajax({
               type: "POST",
               url: "index.php?m=help&c=help_admin&a=admin_help_add_do",
               data: "help_type="+help_type+"&help_title="+help_title+"&help_body="+help_body,
               async: false
            }).responseText;
			if (admin_help_add == "1"){
				toastr.info("帮助标题已存在，请更换后重新提交！");
			} else if (admin_help_add == "2") {
				toastr.success("恭喜您："+help_title+" ，帮助添加成功！");
			} else {
				toastr.error("请勿提交非法数据！");
			}
         });		 
    });